/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.test.example.webservice;

import com.henryschein.mmvvcc.slave.WSGetQuote;
import com.henryschein.mmvvcc.slave.WSGetQuoteService;

/**
 *
 * @author Alexx
 */
public final class MainWebService {
    
    //To generate WSDL client classes
    //wsimport -d target\classes -s src\main\java http://localhost:8888/JPAnMVC/ws?wsdl
    
    private MainWebService(){}
    
    public static String getQuote(){
        String out = "";
        try {
        WSGetQuoteService service  = new WSGetQuoteService();
        WSGetQuote port = service.getWSGetQuotePort();
        out = "\n\n\n ------------------ \n Data got from Web Service: \n " + port.getWSQuote() + "\n ------------------";
        } catch(Exception e){
            out = " \n\n\n ------------------ \n Web service isn't available \n ------------------";
        }    
        return out;
    }
}
